﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SMWJamecl.BusinessEntities;
using SMWJamecl.Repository;
using Microsoft.Practices.Unity;// lo importamos para agregar la dependencia

namespace SMWJamecl.BusinessLogic
{
    public class VehiculoService:IVehiculoService
    {
        [Dependency]
        public IVehiculoRepository VehiculoRepository { get; set; }
        

        public List<Vehiculo> GetVehiculosByCriterio(string criterio)
        {
            return VehiculoRepository.GetVehiculosByCriterio(criterio);
        }

        public List<Vehiculo> GetAllFromVehiculos()
        {
            return VehiculoRepository.GetAllFromVehiculos();
        }

        public Vehiculo GetVehiculoByPlaca(string placa)
        {
            return VehiculoRepository.GetVehiculoByPlaca(placa);
        }

        public void AddVehiculo(Vehiculo vehiculo)
        {
            VehiculoRepository.AddVehiculo(vehiculo);
        }

        public void UpdateVehiculo(Vehiculo vehiculo)
        {
            VehiculoRepository.UpdateVehiculo(vehiculo);
        }

        public void RemoveVehiculo(string placa)
        {
            VehiculoRepository.RemoveVehiculo(placa);
        }
    }
}
